package com.zqh.myfmmall.clients;

import com.zqh.myfmmall.fallback.ShoppingCartCUDClientFallback;
import com.zqh.myfmmall.result.Result;
import com.zqh.myfmmall.rowbeans.entity.ShoppingCart;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Description :
 * @Author :kono淇杭哒、
 * @Create 2022-02-22 22:03
 */
@FeignClient(value = "shoppingcart-cud",fallbackFactory = ShoppingCartCUDClientFallback.class)
public interface ShoppingCartCUDClient{
    @PostMapping("shoppingCart/create")
    Result add(@RequestBody ShoppingCart shoppingCart);

    @PutMapping("shoppingCart/update")
    Result update(@RequestBody ShoppingCart shoppingCart);

    @PutMapping("shoppingCart/updateBatch")
    Result updateBatch(@RequestBody List<ShoppingCart> shoppingCarts);

    @PutMapping("shoppingCart/delete")
    Result delete(@RequestBody List<String> ids);
}
